package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SLotteryPeriodResDao;
import com.xyz.domain.table.SLotteryPeriodRes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SLotteryPeriodResLogic {

    @Autowired
    private SLotteryPeriodResDao sLotteryPeriodResDao;

    public SLotteryPeriodRes add(SLotteryPeriodRes sLotteryPeriodRes){
        return sLotteryPeriodResDao.insert(sLotteryPeriodRes);
    }

    public Integer update(SLotteryPeriodRes sLotteryPeriodRes){
        return sLotteryPeriodResDao.update(sLotteryPeriodRes);
    }

    public List<SLotteryPeriodRes> list(SLotteryPeriodRes sLotteryPeriodRes, String orderBy){
        return sLotteryPeriodResDao.selectList(sLotteryPeriodRes, orderBy);
    }

    public Integer delete(Integer key){
        return sLotteryPeriodResDao.delete(key);
    }

    public PageResponseModel<SLotteryPeriodRes> pageInfo(SLotteryPeriodRes sLotteryPeriodRes, String orderBy, Integer pageNo, Integer pageSize){
        return sLotteryPeriodResDao.selectByPageNo(sLotteryPeriodRes, orderBy, pageNo, pageSize);
    }

}